<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>会员登录</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
<!-- Mobile Devices Support @begin -->
<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
<meta content="no-cache" http-equiv="pragma">
<meta content="0" http-equiv="expires">
<meta content="telephone=no, address=no" name="format-detection">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<meta name="apple-mobile-web-app-capable" content="yes" />
<!-- apple devices fullscreen -->
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<!-- Mobile Devices Support @end -->
<link rel="stylesheet" type="text/css" href="FortAwesome/docs/assets/css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript">
   var _global = {};
	   _global.spm = {};

document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {WeixinJSBridge.call('hideToolbar');});
</script>
<script type="text/javascript" src="js/jquery-2.0.3.min.js"></script>
</head>

<body>
<div class="body login-bg">

    <p class="login-logo"><img src="images/logo.png" alt="logo"></p>
    <h2 class="login-tit">会员登录</h2>
    <div class="login-div">
      <form id="form-btn">
        <p class="clearfix"><span class="floatl">帐号：</span><em class="floatr">
          <input type="text" class="ltxt floatl" id="phone-hint" name="phone">
          </em></p>
        <p class="clearfix"><span class="floatl">密码：</span><em class="floatr">
          <input type="password" class="ltxt floatl" name="password" id="password-hint">
          </em></p>
        <p class="clearfix lbtn">
          <input type="button" class="orange-btn floatl lbtn-dl" id="btn-login" value="登录">
          <a href="#" class="floatr red-btn">申请VIP</a></p>
      </form>
    </div>
 
  <!--下导航-->
  <div class="js-navmenu nav-on-bottom style-2">
    <div class="nav-menu has-menu-3"> <a href="/index.html" class="icon-home"></a>
      <div class="divide">&nbsp;</div>
      <div class="one"> <a class="mainmenu js-mainmenu" href="javascript:void(0);"> <i class="arrow-weixin"></i> 菜品 </a>
        <div class="submenu js-submenu"> <span class="arrow before-arrow"></span> <span class="arrow after-arrow"></span>
          <ul>
            <li> <a href="foodlist.html"> 火锅 </a> </li>
            <li> <a href="foodlist.html"> 地方菜 </a> </li>
            <li> <a href="foodlist.html"> 西餐 </a> </li>
            <li> <a href="foodlist.html"> 快餐 </a> </li>
          </ul>
        </div>
      </div>
      <div class="divide">&nbsp;</div>
      <div class="one"> <a class="mainmenu js-mainmenu" href="javascript:void(0);"> <i class="arrow-weixin"></i> 订位 </a>
        <div class="submenu js-submenu"> <span class="arrow before-arrow"></span> <span class="arrow after-arrow"></span>
          <ul>
            <li> <a href="foodlist.html"> 我要订位 </a> </li>
            <li> <a href="membercenter.html"> 会员中心 </a> </li>
          </ul>
        </div>
      </div>
      <div class="divide">&nbsp;</div>
      <div class="one"> <a class="mainmenu js-mainmenu" href="javascript:void(0);"> <i class="arrow-weixin"></i> VIP </a>
        <div class="submenu js-submenu"> <span class="arrow before-arrow"></span> <span class="arrow after-arrow"></span>
          <ul>
            <li> <a href="register.html"> 我要成为VIP </a> </li>
            <li> <a href="score.html"> 积分兑换 </a> </li>
          </ul>
        </div>
      </div>
      <div class="divide">&nbsp;</div>
      <div class="one"> <a class="mainmenu js-mainmenu" href="javascript:void(0);"> <i class="arrow-weixin"></i> 订单 </a>
        <div class="submenu js-submenu"> <span class="arrow before-arrow"></span> <span class="arrow after-arrow"></span>
          <ul>
            <li> <a href="ordering.html"> 我的订单 </a> </li>
          </ul>
        </div>
        <!--submenu js-submenu--> 
      </div>
      <!--one--> 
    </div>
  </div>
  <!--nav-on-bottom下导航结束-->  
</div>
<!--body--> 
<script type="text/javascript" src="js/wap.min.js"></script>

<script type="text/javascript">
  $("#btn-login").click(function() {
      console.log($("#form-btn").serialize())
    $.ajax({
      "url" : "/user/login",
      "data" : {
        phone:$("#phone-hint").val(),
        password:$("#password-hint").val()
      },
      "type" : "post",
      "dataType" : "json",
      "success" : function(json) {
        if (json.state == 200) {
          alert("登录成功");
          window.location.href = 'index.html';
        } else {
          alert("用户名或者密码错误！！！");
        }
      }
    })
  })

</script>

</body>
</html>